package com.adingxiong.cft.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author xiongc
 * @since 2020-09-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TUser对象", description="用户表")
@Document(indexName = "user",type = "docs",shards = 5,replicas = 0)
public class TUser implements Serializable {

    private static final long serialVersionUID=1L;
    @Field(type = FieldType.Keyword)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @Field(analyzer = "ik_max_word",type = FieldType.Text)
    @ApiModelProperty(value = "用户名")
    private String username;
    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "密码")
    private String password;
    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "头像")
    private String icon;
    @Field(analyzer = "ik_max_word",type = FieldType.Text)
    @ApiModelProperty(value = "昵称")
    private String nickName;
    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "邮箱")
    private String email;
    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "备注")
    private String note;
    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "最后一次登录时间")
    private Date loginTime;
    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "账号有效性 1:有效 0无效")
    private Integer status;


}
